# 第一种方式
# while geshu > 0:
#     if geshu <= 20:
#         print("*", end=",")
#     else:
#         geshu = 20
#         print("*", end=",")
#     geshu -= 1
geshu = int(input("请输入要打印星号的行数："))
a = 0  # 循环次数
while a < geshu:
    a += 1
    print(a, "*", end=",")
    if a == 20:
        break
